package Month07.day22.stu;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class test4 {
    public static void main(String[] args) throws ParseException {
        Scanner scanner = new Scanner(System.in);
        System.out.println("按xxxx-xx-xx的格式输入你的生日");
        String bir=scanner.next();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date date=simpleDateFormat.parse(bir);
        long l=date.getTime();
        System.out.println(l);
        long now=System.currentTimeMillis();
        System.out.println(now);
        System.out.println("活了"+(now-l)/1000/60/60/24+"天");
    }
}
